<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://www.petercorke.com/RVC/common/toolboxhelp.css">
    <title>M-File Help: trlog</title>
  </head>
  <body>
  <table border="0" cellspacing="0" width="100%">
    <tr class="subheader">
      <td class="headertitle">M-File Help: trlog</td>
      <td class="subheader-left"><a href="matlab:open trlog">View code for trlog</a></td>
    </tr>
  </table>
<h1>trlog</h1><p><span class="helptopic">logarithm of SO(3) or SE(3) matrix</span></p><p>
<strong>s</strong> = <span style="color:red">trlog</span>(<strong>R</strong>) is the matrix logarithm (3x3) of <strong>R</strong> (3x3)  which is a skew
symmetric matrix corresponding to the vector theta*w where theta is the
rotation angle and w (3x1) is a unit-vector indicating the rotation axis.

</p>
<p>
[<strong>theta</strong>,<strong>w</strong>] = <span style="color:red">trlog</span>(<strong>R</strong>) as above but returns directly <strong>theta</strong> the rotation
angle and <strong>w</strong> (3x1) the unit-vector indicating the rotation axis.

</p>
<p>
<strong>s</strong> = <span style="color:red">trlog</span>(<strong>T</strong>) is the matrix logarithm (4x4) of <strong>T</strong> (4x4)  which has a (3x3)
skew symmetric matrix upper left submatrix corresponding to the vector
<strong>theta</strong>*<strong>w</strong> where <strong>theta</strong> is the rotation angle and <strong>w</strong> (3x1) is a unit-vector
indicating the rotation axis, and a translation component.

</p>
<p>
[<strong>theta</strong>,<strong>twist</strong>] = <span style="color:red">trlog</span>(<strong>T</strong>) as above but returns directly <strong>theta</strong> the rotation
angle and a <strong>twist</strong> vector (6x1) comprising [v <strong>w</strong>].

</p>
<h2>Notes</h2>
<ul>
  <li>Efficient closed-form solution of the matrix logarithm for arguments that are
SO(3) or SE(3).</li>
  <li>Special cases of rotation by odd multiples of pi are handled.</li>
  <li>Angle is always in the interval [0,pi].</li>
</ul>
<h2>References</h2>
<ul>
  <li>"Mechanics, planning and control"
Park & Lynch, Cambridge, 2016.</li>
</ul>
<h2>See also</h2>
<p>
<a href="trexp.html">trexp</a>, <a href="trexp2.html">trexp2</a>, <a href="Twist.html">Twist</a></p>
<hr>

<table border="0" width="100%" cellpadding="0" cellspacing="0">
  <tr class="subheader" valign="top"><td>&nbsp;</td></tr></table>
<p class="copy">&copy; 1990-2014 Peter Corke.</p>
</body></html>